<?php
namespace app\common\validate\Subject;
use think\Validate;
class Order extends Validate{
    protected $rule = [
        'total' => ['require'],
        'busid' => ['require'],
        'subid'=>['require'],
        'code'=>['require','unique:subject_order']
    ];

    // 错误提示信息
    protected $message = [
        'total.require' => '订单金额必填',
        'subid.require' => '课程id必填',
        'busid.require' => '用户id必填',
        'code.require' => '订单号必填',
        'code.unique' => '订单号必须是唯一',
    ];
}